using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SysFrame.Message;
using System.Reflection;

namespace SysFrame.BP
{
    /// <summary>
    /// system_12方法
    /// </summary>
    public class BLLsystem_12
    {
        public Isystem_12 interface_system_12;

        public BLLsystem_12()
        {
            object obj = BPBase.GetAchieve("SysFrame.BP","system_12");
            interface_system_12 = (Isystem_12)obj;
        }


        /// <summary>
        /// 得到system_12实体
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public List<Mssystem_12> Getsystem_12MsByQuery(MsQuery msq)
        {
            return interface_system_12.Getsystem_12MsByQuery(msq);
        }

        /// <summary>
        /// 通过System_12_10得到实体
        /// </summary>
        /// <param name="System_12_10">ID</param>
        /// <returns>实体</returns>
        public Mssystem_12 Getsystem_12MsByKey(string System_12_10)
        {
            MsQuery msquery = new MsQuery();
            msquery.strquery += " and System_12_10='" + System_12_10 + "' ";
            List<Mssystem_12> lstData = Getsystem_12MsByQuery(msquery);
            return lstData[0];
        }

        /// <summary>
        ///  保存system_12信息
        /// </summary>
        /// <param name="ms">实体信息</param>
        /// <returns>消息</returns>
        public MsReturned Savesystem_12(Mssystem_12 ms)
        {
            return interface_system_12.Savesystem_12(ms);
        }

        /// <summary>
        /// 得到数据类型
        /// </summary>
        /// <param name="msquery">条件</param>
        /// <returns>数据类型</returns>
        public MsReturned Getsystem_12ByQuery(MsQuery msquery)
        {
            return interface_system_12.Getsystem_12ByQuery(msquery);
        }

        /// <summary>
        /// 删除system_12
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deletesystem_12ByQuery(MsQuery msq)
        {
            return interface_system_12.Deletesystem_12ByQuery(msq);
        }
        /// <summary>
        /// 删除system_12
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deletesystem_12ByKey(string System_12_10)
        {
            MsQuery msquery = new MsQuery();
            
             if (System_12_10.IndexOf(",") > 0)
            {
                msquery.strquery += " and System_12_10 in (" + System_12_10 + ") ";
            }
            else
            {
                msquery.strquery += " and System_12_10='" + System_12_10 + "' ";
            }
            return interface_system_12.Deletesystem_12ByQuery(msquery);
        }
    }
}
